import request from '../utils/request.js'

//  搜索景区
// query scenicName 搜索内容  pageNum 页码数   pageSize 页码数据大小
export const getScene = (params) => {
  return request.get('/app/scenic/findScenicBySearch',  params )
}

// 搜索景点数据
//  query scenicId 景区id
export const getscenicdetails = (params) => {
  return request.get('/app/scenic/findScenicById', params )
}

// 删除景点
// query scenicId 景区id
export const deletescene = (params) => {
  return request.del(`/app/scenic/deleteScenic?scenicId=${params}`)
}

// 更新景点数据
// body
export const updatescene = (params) => {
  return request.put('/app/scenic/addScenic', params)
}

// 添加景点数据
// body
export const addscene = (params) => {
  return request.post('/app/scenic/addScenic', params)
}

// 图片上传
export const upload = (params) => {
  return request.post('/app/scenic/picUpload', params)
}